package cn.com.nes.site.event.project;

import cn.com.nes.mybatis.agent.project.entity.ProjectLog;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class ProjectEventPublisher {

    @Resource
    private ApplicationEventPublisher applicationEventPublisher;

    public void publishEvent(ProjectLog projectLog) {
        applicationEventPublisher.publishEvent(new ProjectLogEvent(this, projectLog));
        // ContextLoader.getCurrentWebApplicationContext().publishEvent(new ProjectLogEvent(this, projectLog));
    }

}
